<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body><!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
</head>

<body>
<p><img src="error.jpg" data-src="https://materialdb.zhaoyl.com/201809/105567.jpg" width="264"/></p>
<p><img src="error.jpg" data-src="https://materialdb.zhaoyl.com/201809/106796.jpg" width='264'/></p>
<p><img src="error.jpg" data-src="https://materialdb.zhaoyl.com/201809/1067961.jpg" width='264'/></p>
</body>
<script src="../src/ec-do-3.0.0-beta.2.js"></script>
<script>
    //测试前请先清空缓存，调低网络速度
    window.onload = function () {
        let oImg=document.getElementsByTagName('img');
        for(let i=0;i<oImg.length;i++){
            ecDo.aftLoadImg({
                dom:oImg[i],
                url:oImg[i].dataset.src,
                errorUrl:oImg[i].src,
                fn:function (dom,msg) {
                    console.log(`第${i+1}张图${msg?'加载成功':'加载失败'}`)
                }
            })
        }
    }
</script>

</html>

</body>
</html>